// _Channels_ are the pipes that connect concurrent
// goroutines. You can send values into channels from one
// goroutine and receive those values into another
// goroutine.

package main

import (
	"fmt"
	"gobyexample/pkg/channel"
	"time"
)

func main() {

	fmt.Println("--------DemoChannelNormal-----------")
	channel.DemoChannelNormal()
	time.Sleep(5 * time.Second)
	fmt.Println("--------DemoChannelBuffering-----------")
	channel.DemoChannelBuffering()
	time.Sleep(5 * time.Second)
	fmt.Println("--------DemoChannelSynchronize-----------")
	channel.DemoChannelSynchronize()
	time.Sleep(5 * time.Second)
	fmt.Println("--------DemoChannelDirections-----------")
	channel.DemoChannelDirections()
	time.Sleep(5 * time.Second)
	fmt.Println("--------DemoChannelDirections-----------")
	channel.DemoNonblockChannelOperation()
	fmt.Println("--------DemoClosingChannels-----------")
	channel.DemoClosingChannels()
	fmt.Println("--------DemoRangeOverChannels-----------")
	channel.DemoRangeOverChannels()
	time.Sleep(3 * time.Second)
	fmt.Println("--------DemoTimer-----------")
	channel.DemoTimer()
	time.Sleep(3 * time.Second)
	fmt.Println("--------DemoTicker-----------")
	channel.DemoTicker()
}
